/**
 * CommonDialog
 */

 var CommonDialog = {
     componentWillMount: function (){
         this.rStyle = {
             position: "fixed",
             top: "50%",
             left: "50%",
             width: "670px",
             height: "auto",
             marginLeft: "-335px",
             display: "block",
             borderRadius: '5px',
             overflow: 'hidden'
         };
         this.data = this.props.data;
         this.root = this.props.root;
     },
     componentDidMount: function (){
          this.refs.dialog.style.marginTop = "-" + Math.round($(this.refs.dialog).height() / 2) + "px";
     },
     handleOnCloseDialog: function (){
         this.props.updateState("dialog", "");
     }
 };

 module.exports = CommonDialog;
